﻿using System.Windows;

namespace SessionHunter.Messages
{
    /// <summary>
    /// Will open a specific View from the context of the MainViewModel
    /// </summary>
    public class OpenWindowMessage
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenWindowMessage"/> class.
        /// </summary>
        /// <param name="viewChangeDatabaseConnection">The view change database connection.</param>
        /// <param name="modal">if set to <c>true</c> view will be opened as a modal window.</param>
        public OpenWindowMessage(Window viewChangeDatabaseConnection, bool modal = false)
        {
            View = viewChangeDatabaseConnection;
            Modal = modal;
        }
        /// <summary>
        /// Gets or sets the view to open
        /// </summary>
        /// <value>
        /// The modal window.
        /// </value>
        public Window View
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value indicating whether to open the view as a modal window or not
        /// </summary>
        /// <value>
        ///   <c>true</c> if modal; otherwise, <c>false</c>.
        /// </value>
        public bool Modal
        {
            get;
            set;
        }
    }
}
